{% extends "Acc_Door_Mng.html" %}
{% load i18n %}

{% block virtual_app_config %}
    $("#id_sys_virtual_app").val("elevator");
    $("#id_EleFirstOpenPage").hide();
{% endblock %}

{% block getdatalist_device_type %}
"init_query": ["device_type__exact=5"],
"base_query": ["device_type__exact=5"],
{% endblock %}

{% block getdatalist_dev_disable_cols_actions %}      
"disable_cols": ['last_activity','device_type','Fpversion','transaction_count','fw_version','area.areaname','sn','acpanel_type','show_last_activity','get_dstime_name','show_fp_mthreshold',{% if "mysite"|is_zkaccess_5to4 %}'fp_count',{%endif%}],
"disabled_actions": ['OpRemoveDSTime','OpSetDSTime','OpRenameAuxIn','OpRenameAuxOut','OpCtrlAuxOut','OpLinkageInputCfg','_change','ClearData','OpBrowseLog','ClearPicture','ClearTransaction','OpReloadData','OpReloadLogData','Resume','Pause','RefreshDeviceInfo','Resume','Syncdata','_delete','Reboot',{% if "mysite"|is_zkaccess_5to4 %}'OpChangeMThreshold',{%endif%}],
{% endblock %}

{% block browse_floor_default %} 
//默认打开第一个控制器的门
$(".child_show:first").click(); 
{% endblock %}

{% block browse_floor_judge %} 
if(device_id != 0)
{
    $("#id_datalist .dt_bdiv:first>table>tbody>tr[data="+device_id+"] .child_show").click();
    //device_id=0;
}
{% endblock %}

{% block getdatalist_door_disable_cols_actions %}    
"disable_cols": ["accmorecardset_set|detail_list_set","accfirstopen_set|detail_list_set"],
"disabled_actions": ['_change','_delete'],
{% endblock %}

{% block special_js_init_after_get_jdata %}process_menu();{% endblock %}
{% block special_js_reload_after_get_jdata %}process_menu();{% endblock %}

{% block addjs %}
	$("#id_advanced_search").hide();
{% endblock %}

{% block special_js %}
function process_menu()
{
    //查询
    $("label[for='id_iaccess:accdoor__door_name']").text("{% trans "楼层名称" %}"+":")

    //数据列表
    $("#door_no div").text("{% trans "编号" %}");
    $("#door_name div").text("{% trans "楼层名称" %}");
    $("#lock_active div").text("{% trans "楼层有效时间段" %}");

    //变通解决首卡常开模板问题。
    $("#id_tbl .new").each(function(){
       // $(this).attr("href", "EleFirstOpenPage");
        var old_href = $(this).attr("href");
        var new_href = "../../elevator/EleFirstOpenPage/?"+old_href.split("?")[1];
        $(this).attr("href", new_href);
    });
}
{% endblock %}

